<?php

use App\Company\Controllers\AuthController;
use App\Company\Controllers\CompanyController;
use App\Company\Controllers\JobpositionController;
use App\Company\Controllers\SignUpJobPositionController;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

//    $router->resource('/', JobpositionController::class);
    $router->redirect('/', 'company/jobposition');
    //职位管理
    $router->resource('jobposition', JobpositionController::class);
    //报名列表
    $router->get('sign-up', [SignUpJobPositionController::class,'index']);

    $router->post('auth/login-mobile', [AuthController::class,'loginMobile']);
    $router->post('auth/mobile-verify-code', [AuthController::class,'mobileVerifyCode']);


    $router->get('update-info',[CompanyController::class,'updateInfo']);
    $router->put('update-info',[CompanyController::class,'updateInfoPut']);

    $router->any('image',[CompanyController::class,'image']);
});
